package com.bj.test.service;

import com.bj.test.dao.UserMapper;
import com.bj.test.model.User;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;

@Service
public class UserService {
    @Resource
    private UserMapper userMapper;

    public String getUserNameByUserId(String id) {
        return "user name is username " + id;
    }

    public User getUserById(int userId) {
        return userMapper.selectByPrimaryKey(userId);
    }
}